home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
A-COMAL Series
/
(k)aad.d64
/
lst.roads'main
< prev
next >
Wrap
Text File
|
2007-02-28
|
564b
|
23 lines
0010 ╨╥╔╬╘ ├╚╥$(147),├╚╥$(14),
0020 ╨╥╔╬╘ "├ONVERSION OF A NUMBER."
0030 ─╔═ RES$ ╧╞ 80 // ╘HIS STRING WILL
0040 // CONTAIN THE RESULT OF THE CONVERSION
0050 FLAG:=╘╥╒┼ // ╞LAG TO RECOGNIZE
0060 // INCORRECT INPUT
0070 ╥┼╨┼┴╘
0080 ╨╥╔╬╘
0090 ╔╞ FLAG=╞┴╠╙┼ ╘╚┼╬
0100 ╨╥╔╬╘ "┼RROR! ┴GAIN"
0110 ┼╬─╔╞
0120 ╔╬╨╒╘ "╬UMBER ?": NUMBER
0130 ╔╬╨╒╘ "╔N ┬ASE ?": BASE#
0140 FLAG:=╞┴╠╙┼
0150 ╒╬╘╔╠ BASE#>1 ┴╬─ BASE#<37
0160 ╔╞ NUMBER<0 ╘╚┼╬
0170 NUMBER:=┴┬╙(NUMBER)
0180 RES$:="-"
0190 ┼╬─╔╞
0200 CONVERT(NUMBER,BASE#,RES$)
0210 ╨╥╔╬╘
0220 ╨╥╔╬╘ RES$